#pragma once

#include <string>
#include <map>
#include <vector>

using namespace std;

class Index
{
public:
	Index(const string& fileName, bool onlyAccount);
	~Index(void);
	vector<string> GetOffsetList(const string &key,  bool onlyAccount);
private:
	bool ReadFromFile(const string& fileName, bool onlyAccount);
	bool ParseLine(const string& line, bool onlyAccount);
	void InsertToMap(map<string, vector<string> >& map, string key, string value);
	void ClearMap(map<string, vector<string> >& dict);
private:
	map<string, vector<string> > indexAccount;
	map<string, vector<string> > indexAccountSecurity;
};

